package com.easyweb.entity;

// Generated May 29, 2009 4:16:57 PM by Hibernate Tools 3.2.4.GA

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.ManyToOne;

import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Version;

import org.hibernate.annotations.CacheModeType;
import org.hibernate.annotations.NamedQueries;
import org.hibernate.annotations.NamedQuery;
import org.hibernate.validator.Length;
import org.hibernate.validator.NotNull;

/**
 * Bankasubeleri generated by hbm2java
 */
@Entity
@NamedQueries( {					
	@NamedQuery(name = "bankaSubelerBankayaGore", query = "select b from BankaSubeleri b  where (b.iptal IS NULL OR  b.iptal = ' ' OR b.iptal <> '*') and b.bankaTanimlari.id=:p1 order by b.subeAdi")
})
@Table 
public class BankaSubeleri implements java.io.Serializable {

	private static final long serialVersionUID = 1L;
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	private Long id;

	@Version
	@Column(name = "version")
	private Integer version;

	@Column(name = "subeAdi", nullable = false, length = 150)
	@NotNull(message="#{messages.errBosOlamaz}")
	@Length(max = 150,message="#{messages.errUzunlukElliGecemez}")
	private String subeAdi;
	
	@Column(name = "subeKodu", nullable = false, length = 5)
	@NotNull(message="#{messages.errBosOlamaz}")
	@Length(max = 5,message="#{messages.errUzunlukBesGecemez}")
	private String subeKodu;

	@ManyToOne(fetch=FetchType.LAZY)
	private BankaTanimlari bankaTanimlari;

	@Column(name = "iptal", length = 1)
	private Character iptal;
	
	public BankaSubeleri() {
	}

	public BankaSubeleri(String subeAdi, String subeKodu) {
		this.subeAdi = subeAdi;
		this.subeKodu = subeKodu;
	}

	 

	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Integer getVersion() {
		return this.version;
	}

	public void setVersion(Integer version) {
		this.version = version;
	}

	public String getSubeAdi() {
		return this.subeAdi;
	}

	public void setSubeAdi(String subeAdi) {
		this.subeAdi = subeAdi;
	}

	
	public String getSubeKodu() {
		return this.subeKodu;
	}

	public void setSubeKodu(String subeKodu) {
		this.subeKodu = subeKodu;
	}

	public BankaTanimlari getBankaTanimlari() {
		return bankaTanimlari;
	}

	public void setBankaTanimlari(BankaTanimlari bankaTanimlari) {
		this.bankaTanimlari = bankaTanimlari;
	}

	public Character getIptal() {
		return iptal;
	}

	public void setIptal(Character iptal) {
		this.iptal = iptal;
	}

	 
	 

}
